<%@page import="java.util.Date"%>
<%@page import="java.io.FileOutputStream"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.io.StringWriter"%>
<%@ page language="java"%>
  

<%
	InputStream iis = request.getInputStream();
	
	FileOutputStream fos = new FileOutputStream("D:\\demo.jpg");
	
	byte buff[] = new byte[1024*8];
	while( true) {
		int i = iis.read(buff);
		if(i<0)
			break;		
		fos.write(buff,0,i);		
	}
	response.setContentType("image/jpeg");
	response.getWriter().print("image-"+new Date().getTime());
	fos.close();
%>

